Skip to main content

Overview

LANCommander supports the use of install scripts for handling anything after the download and extraction of a game by the launcher or SDK. Common uses for install scripts include importing registry keys, updating configs, and templating file structures. Like all client-side scripts with LANCommander, these are PowerShell scripts that are executed post-extraction using the built in runtime.

Here are some examples of some post-install automation you may want to consider:

  • Import/create registry keys necessary for game execution
  • Automatic detection of the primary display's resolution to update the game's graphics config
  • Scaffolding game files structures (profile directories required by the game)
  • Automatic installation of dependencies

Variables

When an install script is executed, the following variables are available within the runtime:

NameTypeDescriptionApplicable To
$InstallDirectorystringThe install directory the game archive has been extracted toGames
$GameManifestLANCommander.SDK.GameManifestThe game manifest containing metadata about the gameGames
$DefaultInstallDirectorystringThe default install directory as specified in the clientGames
$ServerAddressstringThe source LANCommander server addressGames, Redistributables
$RedistributableLANCommander.SDK.Models.RedistributableThe redistributable's data objectRedistributables